/*
    config.h
        Define a set of function of config
    BeginnerC
*/
#ifndef CONFIG_H
#define CONFIG_H
#define KEY_MAX_LENGTH 32
#define VALUE_MAX_LENGTH 256
#define LINE_MAX_LENGTH 512
#define DEFAULT_CONFIG_NAME "config.ini"
#define MDBOOK_PATH "MDBOOK_PATH"
/*
    struct Config
        Describle a setting
*/
typedef struct Config
{
    /* The key */
    char key[KEY_MAX_LENGTH];
    /* The value */
    char value[VALUE_MAX_LENGTH];
}Config;
/* Load config */
Config* LoadConfig(const char *config_path);
/* Get the value to the key */
char* GetConfigValue(Config *config, const char *key);
/* Free config memory */
void FreeConfig(Config *config);
#endif